<!--
 * @Description:
 * @Author: cgt
 * @Date: 2021-12-23 14:05:56
 * @LastEditors: cgt
 * @LastEditTime: 2021-12-28 19:59:54
-->
<template>
  <div class="search-container">
    <el-button @click="show = true">显示</el-button>
    <el-button @click="show = false">隐藏</el-button>
    <search-panel v-show="show" :getTool="getTool"></search-panel>
  </div>
</template>

<script>
import mixins from '../mixins';
import SearchPanel from './SearchPanel';
export default {
  name: 'SearchTool',
  components: {
    SearchPanel
  },
  props: {
    getTool: {
      type: Function,
      required: true
    }
  },
  mixins: [mixins],
  data() {
    return {
      show: true
    };
  },
  methods: {
    searchByMap(params) {
      return this.getTool('SearchTool').searchByMap(params);
    },
    searchByServer(params) {
      return this.getTool('SearchTool').searchByServer(params);
    }
  }
};
</script>

<style scoped></style>
